package com.hyt.it.ogt.ykcj.common.enums.zs;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Description:    证书状态：1-已发布，2-未发布
 * @Author: STARF
 * @CreateDate: 2022/06/24 15:12
 **/
@Getter
@AllArgsConstructor
public enum CertificateStatusEnums {

    PUBLISHED(1, "已发布"),
    UNPUBLISHED(2, "未发布"),
    ;

    private final Integer code;
    private final String desc;

    public static CertificateStatusEnums getByCode(Integer code) {
        for (CertificateStatusEnums enums : values()) {
            if (enums.getCode().equals(code)) {
                return enums;
            }
        }
        return null;
    }
}
